<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@page import="java.util.Random"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.LineBoxChartModel"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.BarSeries"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.LineBoxChart"%>
<%@page import="com.jiuqi.bi.chartpro.chart.linebox.LineSeries"%>
<%@page import="com.jiuqi.bi.chartpro.common.LineType"%>
<%@page import="com.jiuqi.bi.chartpro.chart.axes.ValueAxis"%>
<%@page import="com.jiuqi.bi.chartpro.common.Alignment"%>
<%@page import="com.jiuqi.bi.chartpro.common.Shape"%>
<%@page import="com.jiuqi.bi.chartpro.common.Effect"%>
<%@page import="com.jiuqi.bi.chartpro.common.DataSymbol"%> 
<%@page import="com.jiuqi.bi.chartpro.chart.warnblock.WarnBlockChartModel"%> 
<%@page import="com.jiuqi.bi.chartpro.chart.DatumLineSeries"%> 
<%@page import="com.jiuqi.bi.chartpro.chart.warnblock.WarnBlockChart"%> 
<%@page import="com.jiuqi.bi.chartpro.chart.warnarea.WarnAreaChartModel"%> 
<%@page import="com.jiuqi.bi.chartpro.chart.warnarea.WarnAreaChart"%> 



<%@page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css">
<link href="<%=request.getContextPath()%>/css/table.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color: #ffffff">
<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
	<!-- 位置导航栏 -->
	<tr height="25px">
		<td width="100%" align="center" valign="top">
			 <table width="98%" border="0" cellpadding="0" cellspacing="0" class="tabtitle">
              <tr>
                <td width="4%" valign="top"><img src="../img/pic_dot1.gif" width="37" height="22"></td>
                <td width="96%" valign="middle">当前位置：<a  class="n">远程环境监测</a> &gt;&gt; <a  class="n">预警分析</a></td>
              </tr>
            </table>
		</td>
	</tr>
   
   <!-- 查询工具条 -->
   <tr height="29px">
	   <td valign="top">
	   		<table width="98%" height="29" cellpadding="0" cellspacing="0" align="center" border="0">
	   			<tr height="100%">
		   			<td class="td_title" width="250px" align="left">
		   				<table cellpadding="0" cellspacing="0" border="0">
		   					<tr>
		   						<td align="center" width="70px">年:</td>
		   						<td width="150px">
		   							<span class="treeSpan" onclick="" treeSelect="true">
		   							  	    <select style="width: 150px;">
							  				 <%
							  				 	for(int i = 2009; i <= 2011; i++){
							  				 %>
							  				 	<option><%=i %></option>
							  				 <%		
							  				 	}
							  				 %>
							  				</select>
									</span>
		   						</td>
		   					</tr>
		   				</table>
		   			</td>
		   			<td class="td_title" width="250px" align="left">
		   				<table cellpadding="0" cellspacing="0" border="0">
		   					<tr>
		   						<td align="center" width="70px">月:</td>
		   						<td width="150px">
		   							<span class="treeSpan"  treeSelect="true">
		   							  	    <select style="width: 150px;">
							  				 <%
							  				 	for(int i = 1; i <= 12; i++){
							  				 %>
							  				 	<option><%=i %></option>
							  				 <%		
							  				 	}
							  				 %>
							  				</select>
									</span>
		   						</td>
		   					</tr>
		   				</table>
		   			</td>
		   			<td class="td_title" width="250px" align="left">
		   				<table cellpadding="0" cellspacing="0" border="0">
		   					<tr>
		   						<td align="center" width="70px">日:</td>
		   						<td width="150px">
		   							<span class="treeSpan"  treeSelect="true">
		   							  	    <select style="width: 150px;">
							  				 <%
							  				 	for(int i = 1; i <= 30; i++){
							  				 %>
							  				 	<option><%=i %></option>
							  				 <%		
							  				 	}
							  				 %>
							  				</select>
									</span>
		   						</td>
		   					</tr>
		   				</table>
		   			</td>
		   			<td  class="td_title" align="center">
							<input name="Button12" type="button" class="button_cx" value="" title="查询" onclick="search();">
					</td>
	   			</tr>
	   		</table>
	   </td>
   </tr>
  </table>
<%
	WarnAreaChartModel warnAreaModel=new WarnAreaChartModel(600,400);  
	warnAreaModel.setTitle("预警区域图");  
	warnAreaModel.setHeight(400);
	warnAreaModel.setWidth(1020);
	warnAreaModel.setShowLegend(true);
	warnAreaModel.getValueAxes()[0].setDecimal(3);
	warnAreaModel.getValueAxes()[0].setTitle("气体浓度");
	warnAreaModel.getCategoryAxis().setLabels(new String[]{
			"01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00",
			"10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00",
			"20:00","21:00","22:00","23:00","24:00"
			});  
	//添加雷达序列  
	LineSeries series=new LineSeries("二氧化碳");  
	series.setLineType(LineType.Curve);  
	series.setDataSymbolSize(0);
	series.setBorderColor(0x010101);
	series.setData(new double[]{ 4.681, 3.132, 1.781, 1.679, 1.278, 0.551,
			1.365, 1.768, -3.217, 1.369, -4.797, 0.140, -6.837, 1.292, 0.537,
			0.336, 1.277, 3.501, 1.895, 4.246, 0.219, 6.438, -6.110, 0.375 });  
	warnAreaModel.addSeries(series);  
	//设置上基线  
	DatumLineSeries topDatumLine=warnAreaModel.getTopDatumLine();  
	topDatumLine.setLineType(LineType.Curve);  
	topDatumLine.setData(new double[]{ 2.000, 2.000, 2.000, 2.000, 2.000, 2.000,
			2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000,
			2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000 });  
	//设置下基线  
	DatumLineSeries bottomDatumLine=warnAreaModel.getBottomDatumLine();  
	bottomDatumLine.setLineType(LineType.Curve);  
	bottomDatumLine.setData(new double[]{ -2.000, -2.000, -2.000, -2.000, -2.000, -2.000,
			-2.000, -2.000, -2.000, -2.000, -2.000, -2.000, -2.000, -2.000, -2.000,
			-2.000, -2.000, -2.000, -2.000, -2.000, -2.000, -2.000, -2.000, -2.000 });  
	warnAreaModel.setWarnColors(new int[]{0xff0000,0x2cdf0e,0xff0000});  
	WarnAreaChart warnarea=new WarnAreaChart(warnAreaModel);  
	byte[] imageBytes=warnarea.buildChart();  
	request.getSession().setAttribute("chart",imageBytes);  
 %>
 <jsp:include page="topbar.jsp" >
	<jsp:param name="title" value="当月输出电流波动折线图"/>
</jsp:include>
</body>
</html>